#include "dwgcircletwo.h"
#include <math.h>

DwgCircletwo::DwgCircletwo(QObject *parent)
    : DwgObject{parent}
{}
void DwgCircletwo::Draw(QPainter *p)
{
    radius=sqrt((fPt.x()-bPt.x())*(fPt.x()-bPt.x())+(fPt.y()-bPt.y())*(fPt.y()-bPt.y()))/2;
    QPoint Core((fPt.x() + bPt.x()) / 2, (fPt.y() + bPt.y()) / 2);
    p->drawEllipse(Core, radius, radius);  // 以中心点画椭圆（圆椭圆半径相等）
}

